/**
 * This is a generated class and is not intended for modification.  To customize behavior
 * of this value object you may modify the generated sub-class of this class - VoScSatisfied.as.
 */

package com.model.valueObjects
{
import com.adobe.fiber.services.IFiberManagingService;
import com.adobe.fiber.util.FiberUtils;
import com.adobe.fiber.valueobjects.IValueObject;
import flash.events.Event;
import flash.events.EventDispatcher;
import mx.binding.utils.ChangeWatcher;
import mx.collections.ArrayCollection;
import mx.events.CollectionEvent;
import mx.events.PropertyChangeEvent;
import mx.validators.ValidationResult;

import flash.net.registerClassAlias;
import flash.net.getClassByAlias;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;

use namespace model_internal;

[ExcludeClass]
public class _Super_VoScSatisfied extends flash.events.EventDispatcher implements com.adobe.fiber.valueobjects.IValueObject
{
    model_internal static function initRemoteClassAliasSingle(cz:Class) : void
    {
        try
        {
            if (flash.net.getClassByAlias("VoScSatisfied") == null)
            {
                flash.net.registerClassAlias("VoScSatisfied", cz);
            }
        }
        catch (e:Error)
        {
            flash.net.registerClassAlias("VoScSatisfied", cz);
        }
    }

    model_internal static function initRemoteClassAliasAllRelated() : void
    {
    }

    model_internal var _dminternal_model : _VoScSatisfiedEntityMetadata;

    /**
     * properties
     */
    private var _internal_delivery_loc : ArrayCollection;
    private var _internal_price_per_unit : ArrayCollection;
    private var _internal_preDeliveredQty : ArrayCollection;
    private var _internal_sales_con_date : String;
    private var _internal_pro_total_price : ArrayCollection;
    private var _internal_stamp_number : ArrayCollection;
    private var _internal_available_do_qty : ArrayCollection;
    private var _internal_serialnumber : int;
    private var _internal_sales_con_status : String;
    private var _internal_pro_qty : ArrayCollection;
    private var _internal_currency_serialnumber_fk : int;
    private var _internal_customer_serialnumber_fk : int;
    private var _internal_warehouse_serialnumber_fk : ArrayCollection;
    private var _internal_pro_name : String;
    private var _internal_reserved_qty : int;
    private var _internal_sc_qty : int;
    private var _internal_pro_description : String;
    private var _internal_isSelected : Boolean;
    private var _internal_sc_serialnumber : int;
    private var _internal_part_number : String;
    private var _internal_pro_serialnumber_fk : int;
    private var _internal_sales_con_code : String;
    private var _internal_po_detserialnumber : ArrayCollection;
    private var _internal_sc_detserialnumber : int;

    private static var emptyArray:Array = new Array();


    /**
     * derived property cache initialization
     */
    model_internal var _cacheInitialized_isValid:Boolean = false;

    model_internal var _changeWatcherArray:Array = new Array();

    public function _Super_VoScSatisfied()
    {
        _model = new _VoScSatisfiedEntityMetadata(this);

        // Bind to own data properties for cache invalidation triggering
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "delivery_loc", model_internal::setterListenerDelivery_loc));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "price_per_unit", model_internal::setterListenerPrice_per_unit));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "preDeliveredQty", model_internal::setterListenerPreDeliveredQty));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "sales_con_date", model_internal::setterListenerSales_con_date));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_total_price", model_internal::setterListenerPro_total_price));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "stamp_number", model_internal::setterListenerStamp_number));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "available_do_qty", model_internal::setterListenerAvailable_do_qty));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "sales_con_status", model_internal::setterListenerSales_con_status));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_qty", model_internal::setterListenerPro_qty));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "warehouse_serialnumber_fk", model_internal::setterListenerWarehouse_serialnumber_fk));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_name", model_internal::setterListenerPro_name));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_description", model_internal::setterListenerPro_description));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "part_number", model_internal::setterListenerPart_number));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "sales_con_code", model_internal::setterListenerSales_con_code));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "po_detserialnumber", model_internal::setterListenerPo_detserialnumber));

    }

    /**
     * data property getters
     */

    [Bindable(event="propertyChange")]
    public function get delivery_loc() : ArrayCollection
    {
        return _internal_delivery_loc;
    }

    [Bindable(event="propertyChange")]
    public function get price_per_unit() : ArrayCollection
    {
        return _internal_price_per_unit;
    }

    [Bindable(event="propertyChange")]
    public function get preDeliveredQty() : ArrayCollection
    {
        return _internal_preDeliveredQty;
    }

    [Bindable(event="propertyChange")]
    public function get sales_con_date() : String
    {
        return _internal_sales_con_date;
    }

    [Bindable(event="propertyChange")]
    public function get pro_total_price() : ArrayCollection
    {
        return _internal_pro_total_price;
    }

    [Bindable(event="propertyChange")]
    public function get stamp_number() : ArrayCollection
    {
        return _internal_stamp_number;
    }

    [Bindable(event="propertyChange")]
    public function get available_do_qty() : ArrayCollection
    {
        return _internal_available_do_qty;
    }

    [Bindable(event="propertyChange")]
    public function get serialnumber() : int
    {
        return _internal_serialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get sales_con_status() : String
    {
        return _internal_sales_con_status;
    }

    [Bindable(event="propertyChange")]
    public function get pro_qty() : ArrayCollection
    {
        return _internal_pro_qty;
    }

    [Bindable(event="propertyChange")]
    public function get currency_serialnumber_fk() : int
    {
        return _internal_currency_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get customer_serialnumber_fk() : int
    {
        return _internal_customer_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get warehouse_serialnumber_fk() : ArrayCollection
    {
        return _internal_warehouse_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get pro_name() : String
    {
        return _internal_pro_name;
    }

    [Bindable(event="propertyChange")]
    public function get reserved_qty() : int
    {
        return _internal_reserved_qty;
    }

    [Bindable(event="propertyChange")]
    public function get sc_qty() : int
    {
        return _internal_sc_qty;
    }

    [Bindable(event="propertyChange")]
    public function get pro_description() : String
    {
        return _internal_pro_description;
    }

    [Bindable(event="propertyChange")]
    public function get isSelected() : Boolean
    {
        return _internal_isSelected;
    }

    [Bindable(event="propertyChange")]
    public function get sc_serialnumber() : int
    {
        return _internal_sc_serialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get part_number() : String
    {
        return _internal_part_number;
    }

    [Bindable(event="propertyChange")]
    public function get pro_serialnumber_fk() : int
    {
        return _internal_pro_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get sales_con_code() : String
    {
        return _internal_sales_con_code;
    }

    [Bindable(event="propertyChange")]
    public function get po_detserialnumber() : ArrayCollection
    {
        return _internal_po_detserialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get sc_detserialnumber() : int
    {
        return _internal_sc_detserialnumber;
    }

    /**
     * data property setters
     */

    public function set delivery_loc(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_delivery_loc;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_delivery_loc = value;
            }
            else if (value is Array)
            {
                _internal_delivery_loc = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of delivery_loc must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "delivery_loc", oldValue, _internal_delivery_loc));
        }
    }

    public function set price_per_unit(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_price_per_unit;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_price_per_unit = value;
            }
            else if (value is Array)
            {
                _internal_price_per_unit = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of price_per_unit must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "price_per_unit", oldValue, _internal_price_per_unit));
        }
    }

    public function set preDeliveredQty(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_preDeliveredQty;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_preDeliveredQty = value;
            }
            else if (value is Array)
            {
                _internal_preDeliveredQty = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of preDeliveredQty must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "preDeliveredQty", oldValue, _internal_preDeliveredQty));
        }
    }

    public function set sales_con_date(value:String) : void
    {
        var oldValue:String = _internal_sales_con_date;
        if (oldValue !== value)
        {
            _internal_sales_con_date = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sales_con_date", oldValue, _internal_sales_con_date));
        }
    }

    public function set pro_total_price(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_total_price;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_total_price = value;
            }
            else if (value is Array)
            {
                _internal_pro_total_price = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_total_price must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_total_price", oldValue, _internal_pro_total_price));
        }
    }

    public function set stamp_number(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_stamp_number;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_stamp_number = value;
            }
            else if (value is Array)
            {
                _internal_stamp_number = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of stamp_number must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "stamp_number", oldValue, _internal_stamp_number));
        }
    }

    public function set available_do_qty(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_available_do_qty;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_available_do_qty = value;
            }
            else if (value is Array)
            {
                _internal_available_do_qty = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of available_do_qty must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "available_do_qty", oldValue, _internal_available_do_qty));
        }
    }

    public function set serialnumber(value:int) : void
    {
        var oldValue:int = _internal_serialnumber;
        if (oldValue !== value)
        {
            _internal_serialnumber = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "serialnumber", oldValue, _internal_serialnumber));
        }
    }

    public function set sales_con_status(value:String) : void
    {
        var oldValue:String = _internal_sales_con_status;
        if (oldValue !== value)
        {
            _internal_sales_con_status = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sales_con_status", oldValue, _internal_sales_con_status));
        }
    }

    public function set pro_qty(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_qty;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_qty = value;
            }
            else if (value is Array)
            {
                _internal_pro_qty = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_qty must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_qty", oldValue, _internal_pro_qty));
        }
    }

    public function set currency_serialnumber_fk(value:int) : void
    {
        var oldValue:int = _internal_currency_serialnumber_fk;
        if (oldValue !== value)
        {
            _internal_currency_serialnumber_fk = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "currency_serialnumber_fk", oldValue, _internal_currency_serialnumber_fk));
        }
    }

    public function set customer_serialnumber_fk(value:int) : void
    {
        var oldValue:int = _internal_customer_serialnumber_fk;
        if (oldValue !== value)
        {
            _internal_customer_serialnumber_fk = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "customer_serialnumber_fk", oldValue, _internal_customer_serialnumber_fk));
        }
    }

    public function set warehouse_serialnumber_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_warehouse_serialnumber_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_warehouse_serialnumber_fk = value;
            }
            else if (value is Array)
            {
                _internal_warehouse_serialnumber_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of warehouse_serialnumber_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "warehouse_serialnumber_fk", oldValue, _internal_warehouse_serialnumber_fk));
        }
    }

    public function set pro_name(value:String) : void
    {
        var oldValue:String = _internal_pro_name;
        if (oldValue !== value)
        {
            _internal_pro_name = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_name", oldValue, _internal_pro_name));
        }
    }

    public function set reserved_qty(value:int) : void
    {
        var oldValue:int = _internal_reserved_qty;
        if (oldValue !== value)
        {
            _internal_reserved_qty = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "reserved_qty", oldValue, _internal_reserved_qty));
        }
    }

    public function set sc_qty(value:int) : void
    {
        var oldValue:int = _internal_sc_qty;
        if (oldValue !== value)
        {
            _internal_sc_qty = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sc_qty", oldValue, _internal_sc_qty));
        }
    }

    public function set pro_description(value:String) : void
    {
        var oldValue:String = _internal_pro_description;
        if (oldValue !== value)
        {
            _internal_pro_description = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_description", oldValue, _internal_pro_description));
        }
    }

    public function set isSelected(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_isSelected;
        if (oldValue !== value)
        {
            _internal_isSelected = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "isSelected", oldValue, _internal_isSelected));
        }
    }

    public function set sc_serialnumber(value:int) : void
    {
        var oldValue:int = _internal_sc_serialnumber;
        if (oldValue !== value)
        {
            _internal_sc_serialnumber = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sc_serialnumber", oldValue, _internal_sc_serialnumber));
        }
    }

    public function set part_number(value:String) : void
    {
        var oldValue:String = _internal_part_number;
        if (oldValue !== value)
        {
            _internal_part_number = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "part_number", oldValue, _internal_part_number));
        }
    }

    public function set pro_serialnumber_fk(value:int) : void
    {
        var oldValue:int = _internal_pro_serialnumber_fk;
        if (oldValue !== value)
        {
            _internal_pro_serialnumber_fk = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_serialnumber_fk", oldValue, _internal_pro_serialnumber_fk));
        }
    }

    public function set sales_con_code(value:String) : void
    {
        var oldValue:String = _internal_sales_con_code;
        if (oldValue !== value)
        {
            _internal_sales_con_code = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sales_con_code", oldValue, _internal_sales_con_code));
        }
    }

    public function set po_detserialnumber(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_po_detserialnumber;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_po_detserialnumber = value;
            }
            else if (value is Array)
            {
                _internal_po_detserialnumber = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of po_detserialnumber must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_detserialnumber", oldValue, _internal_po_detserialnumber));
        }
    }

    public function set sc_detserialnumber(value:int) : void
    {
        var oldValue:int = _internal_sc_detserialnumber;
        if (oldValue !== value)
        {
            _internal_sc_detserialnumber = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sc_detserialnumber", oldValue, _internal_sc_detserialnumber));
        }
    }

    /**
     * Data property setter listeners
     *
     * Each data property whose value affects other properties or the validity of the entity
     * needs to invalidate all previously calculated artifacts. These include:
     *  - any derived properties or constraints that reference the given data property.
     *  - any availability guards (variant expressions) that reference the given data property.
     *  - any style validations, message tokens or guards that reference the given data property.
     *  - the validity of the property (and the containing entity) if the given data property has a length restriction.
     *  - the validity of the property (and the containing entity) if the given data property is required.
     */

    model_internal function setterListenerDelivery_loc(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerDelivery_loc);
            }
        }
        _model.invalidateDependentOnDelivery_loc();
    }

    model_internal function setterListenerPrice_per_unit(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPrice_per_unit);
            }
        }
        _model.invalidateDependentOnPrice_per_unit();
    }

    model_internal function setterListenerPreDeliveredQty(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPreDeliveredQty);
            }
        }
        _model.invalidateDependentOnPreDeliveredQty();
    }

    model_internal function setterListenerSales_con_date(value:flash.events.Event):void
    {
        _model.invalidateDependentOnSales_con_date();
    }

    model_internal function setterListenerPro_total_price(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_total_price);
            }
        }
        _model.invalidateDependentOnPro_total_price();
    }

    model_internal function setterListenerStamp_number(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerStamp_number);
            }
        }
        _model.invalidateDependentOnStamp_number();
    }

    model_internal function setterListenerAvailable_do_qty(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerAvailable_do_qty);
            }
        }
        _model.invalidateDependentOnAvailable_do_qty();
    }

    model_internal function setterListenerSales_con_status(value:flash.events.Event):void
    {
        _model.invalidateDependentOnSales_con_status();
    }

    model_internal function setterListenerPro_qty(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_qty);
            }
        }
        _model.invalidateDependentOnPro_qty();
    }

    model_internal function setterListenerWarehouse_serialnumber_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerWarehouse_serialnumber_fk);
            }
        }
        _model.invalidateDependentOnWarehouse_serialnumber_fk();
    }

    model_internal function setterListenerPro_name(value:flash.events.Event):void
    {
        _model.invalidateDependentOnPro_name();
    }

    model_internal function setterListenerPro_description(value:flash.events.Event):void
    {
        _model.invalidateDependentOnPro_description();
    }

    model_internal function setterListenerPart_number(value:flash.events.Event):void
    {
        _model.invalidateDependentOnPart_number();
    }

    model_internal function setterListenerSales_con_code(value:flash.events.Event):void
    {
        _model.invalidateDependentOnSales_con_code();
    }

    model_internal function setterListenerPo_detserialnumber(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPo_detserialnumber);
            }
        }
        _model.invalidateDependentOnPo_detserialnumber();
    }


    /**
     * valid related derived properties
     */
    model_internal var _isValid : Boolean;
    model_internal var _invalidConstraints:Array = new Array();
    model_internal var _validationFailureMessages:Array = new Array();

    /**
     * derived property calculators
     */

    /**
     * isValid calculator
     */
    model_internal function calculateIsValid():Boolean
    {
        var violatedConsts:Array = new Array();
        var validationFailureMessages:Array = new Array();

        var propertyValidity:Boolean = true;
        if (!_model.delivery_locIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_delivery_locValidationFailureMessages);
        }
        if (!_model.price_per_unitIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_price_per_unitValidationFailureMessages);
        }
        if (!_model.preDeliveredQtyIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_preDeliveredQtyValidationFailureMessages);
        }
        if (!_model.sales_con_dateIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_sales_con_dateValidationFailureMessages);
        }
        if (!_model.pro_total_priceIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_total_priceValidationFailureMessages);
        }
        if (!_model.stamp_numberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_stamp_numberValidationFailureMessages);
        }
        if (!_model.available_do_qtyIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_available_do_qtyValidationFailureMessages);
        }
        if (!_model.sales_con_statusIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_sales_con_statusValidationFailureMessages);
        }
        if (!_model.pro_qtyIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_qtyValidationFailureMessages);
        }
        if (!_model.warehouse_serialnumber_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_warehouse_serialnumber_fkValidationFailureMessages);
        }
        if (!_model.pro_nameIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_nameValidationFailureMessages);
        }
        if (!_model.pro_descriptionIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_descriptionValidationFailureMessages);
        }
        if (!_model.part_numberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_part_numberValidationFailureMessages);
        }
        if (!_model.sales_con_codeIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_sales_con_codeValidationFailureMessages);
        }
        if (!_model.po_detserialnumberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_po_detserialnumberValidationFailureMessages);
        }

        model_internal::_cacheInitialized_isValid = true;
        model_internal::invalidConstraints_der = violatedConsts;
        model_internal::validationFailureMessages_der = validationFailureMessages;
        return violatedConsts.length == 0 && propertyValidity;
    }

    /**
     * derived property setters
     */

    model_internal function set isValid_der(value:Boolean) : void
    {
        var oldValue:Boolean = model_internal::_isValid;
        if (oldValue !== value)
        {
            model_internal::_isValid = value;
            _model.model_internal::fireChangeEvent("isValid", oldValue, model_internal::_isValid);
        }
    }

    /**
     * derived property getters
     */

    [Transient]
    [Bindable(event="propertyChange")]
    public function get _model() : _VoScSatisfiedEntityMetadata
    {
        return model_internal::_dminternal_model;
    }

    public function set _model(value : _VoScSatisfiedEntityMetadata) : void
    {
        var oldValue : _VoScSatisfiedEntityMetadata = model_internal::_dminternal_model;
        if (oldValue !== value)
        {
            model_internal::_dminternal_model = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "_model", oldValue, model_internal::_dminternal_model));
        }
    }

    /**
     * methods
     */


    /**
     *  services
     */
    private var _managingService:com.adobe.fiber.services.IFiberManagingService;

    public function set managingService(managingService:com.adobe.fiber.services.IFiberManagingService):void
    {
        _managingService = managingService;
    }

    model_internal function set invalidConstraints_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_invalidConstraints;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_invalidConstraints = value;
            _model.model_internal::fireChangeEvent("invalidConstraints", oldValue, model_internal::_invalidConstraints);
        }
    }

    model_internal function set validationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_validationFailureMessages;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_validationFailureMessages = value;
            _model.model_internal::fireChangeEvent("validationFailureMessages", oldValue, model_internal::_validationFailureMessages);
        }
    }

    model_internal var _doValidationCacheOfDelivery_loc : Array = null;
    model_internal var _doValidationLastValOfDelivery_loc : ArrayCollection;

    model_internal function _doValidationForDelivery_loc(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfDelivery_loc != null && model_internal::_doValidationLastValOfDelivery_loc == value)
           return model_internal::_doValidationCacheOfDelivery_loc ;

        _model.model_internal::_delivery_locIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isDelivery_locAvailable && _internal_delivery_loc == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "delivery_loc is required"));
        }

        model_internal::_doValidationCacheOfDelivery_loc = validationFailures;
        model_internal::_doValidationLastValOfDelivery_loc = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPrice_per_unit : Array = null;
    model_internal var _doValidationLastValOfPrice_per_unit : ArrayCollection;

    model_internal function _doValidationForPrice_per_unit(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPrice_per_unit != null && model_internal::_doValidationLastValOfPrice_per_unit == value)
           return model_internal::_doValidationCacheOfPrice_per_unit ;

        _model.model_internal::_price_per_unitIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPrice_per_unitAvailable && _internal_price_per_unit == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "price_per_unit is required"));
        }

        model_internal::_doValidationCacheOfPrice_per_unit = validationFailures;
        model_internal::_doValidationLastValOfPrice_per_unit = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPreDeliveredQty : Array = null;
    model_internal var _doValidationLastValOfPreDeliveredQty : ArrayCollection;

    model_internal function _doValidationForPreDeliveredQty(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPreDeliveredQty != null && model_internal::_doValidationLastValOfPreDeliveredQty == value)
           return model_internal::_doValidationCacheOfPreDeliveredQty ;

        _model.model_internal::_preDeliveredQtyIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPreDeliveredQtyAvailable && _internal_preDeliveredQty == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "preDeliveredQty is required"));
        }

        model_internal::_doValidationCacheOfPreDeliveredQty = validationFailures;
        model_internal::_doValidationLastValOfPreDeliveredQty = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfSales_con_date : Array = null;
    model_internal var _doValidationLastValOfSales_con_date : String;

    model_internal function _doValidationForSales_con_date(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfSales_con_date != null && model_internal::_doValidationLastValOfSales_con_date == value)
           return model_internal::_doValidationCacheOfSales_con_date ;

        _model.model_internal::_sales_con_dateIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isSales_con_dateAvailable && _internal_sales_con_date == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "sales_con_date is required"));
        }

        model_internal::_doValidationCacheOfSales_con_date = validationFailures;
        model_internal::_doValidationLastValOfSales_con_date = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_total_price : Array = null;
    model_internal var _doValidationLastValOfPro_total_price : ArrayCollection;

    model_internal function _doValidationForPro_total_price(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_total_price != null && model_internal::_doValidationLastValOfPro_total_price == value)
           return model_internal::_doValidationCacheOfPro_total_price ;

        _model.model_internal::_pro_total_priceIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_total_priceAvailable && _internal_pro_total_price == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_total_price is required"));
        }

        model_internal::_doValidationCacheOfPro_total_price = validationFailures;
        model_internal::_doValidationLastValOfPro_total_price = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfStamp_number : Array = null;
    model_internal var _doValidationLastValOfStamp_number : ArrayCollection;

    model_internal function _doValidationForStamp_number(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfStamp_number != null && model_internal::_doValidationLastValOfStamp_number == value)
           return model_internal::_doValidationCacheOfStamp_number ;

        _model.model_internal::_stamp_numberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isStamp_numberAvailable && _internal_stamp_number == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "stamp_number is required"));
        }

        model_internal::_doValidationCacheOfStamp_number = validationFailures;
        model_internal::_doValidationLastValOfStamp_number = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfAvailable_do_qty : Array = null;
    model_internal var _doValidationLastValOfAvailable_do_qty : ArrayCollection;

    model_internal function _doValidationForAvailable_do_qty(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfAvailable_do_qty != null && model_internal::_doValidationLastValOfAvailable_do_qty == value)
           return model_internal::_doValidationCacheOfAvailable_do_qty ;

        _model.model_internal::_available_do_qtyIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isAvailable_do_qtyAvailable && _internal_available_do_qty == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "available_do_qty is required"));
        }

        model_internal::_doValidationCacheOfAvailable_do_qty = validationFailures;
        model_internal::_doValidationLastValOfAvailable_do_qty = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfSales_con_status : Array = null;
    model_internal var _doValidationLastValOfSales_con_status : String;

    model_internal function _doValidationForSales_con_status(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfSales_con_status != null && model_internal::_doValidationLastValOfSales_con_status == value)
           return model_internal::_doValidationCacheOfSales_con_status ;

        _model.model_internal::_sales_con_statusIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isSales_con_statusAvailable && _internal_sales_con_status == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "sales_con_status is required"));
        }

        model_internal::_doValidationCacheOfSales_con_status = validationFailures;
        model_internal::_doValidationLastValOfSales_con_status = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_qty : Array = null;
    model_internal var _doValidationLastValOfPro_qty : ArrayCollection;

    model_internal function _doValidationForPro_qty(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_qty != null && model_internal::_doValidationLastValOfPro_qty == value)
           return model_internal::_doValidationCacheOfPro_qty ;

        _model.model_internal::_pro_qtyIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_qtyAvailable && _internal_pro_qty == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_qty is required"));
        }

        model_internal::_doValidationCacheOfPro_qty = validationFailures;
        model_internal::_doValidationLastValOfPro_qty = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfWarehouse_serialnumber_fk : Array = null;
    model_internal var _doValidationLastValOfWarehouse_serialnumber_fk : ArrayCollection;

    model_internal function _doValidationForWarehouse_serialnumber_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfWarehouse_serialnumber_fk != null && model_internal::_doValidationLastValOfWarehouse_serialnumber_fk == value)
           return model_internal::_doValidationCacheOfWarehouse_serialnumber_fk ;

        _model.model_internal::_warehouse_serialnumber_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isWarehouse_serialnumber_fkAvailable && _internal_warehouse_serialnumber_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "warehouse_serialnumber_fk is required"));
        }

        model_internal::_doValidationCacheOfWarehouse_serialnumber_fk = validationFailures;
        model_internal::_doValidationLastValOfWarehouse_serialnumber_fk = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_name : Array = null;
    model_internal var _doValidationLastValOfPro_name : String;

    model_internal function _doValidationForPro_name(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfPro_name != null && model_internal::_doValidationLastValOfPro_name == value)
           return model_internal::_doValidationCacheOfPro_name ;

        _model.model_internal::_pro_nameIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_nameAvailable && _internal_pro_name == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_name is required"));
        }

        model_internal::_doValidationCacheOfPro_name = validationFailures;
        model_internal::_doValidationLastValOfPro_name = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_description : Array = null;
    model_internal var _doValidationLastValOfPro_description : String;

    model_internal function _doValidationForPro_description(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfPro_description != null && model_internal::_doValidationLastValOfPro_description == value)
           return model_internal::_doValidationCacheOfPro_description ;

        _model.model_internal::_pro_descriptionIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_descriptionAvailable && _internal_pro_description == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_description is required"));
        }

        model_internal::_doValidationCacheOfPro_description = validationFailures;
        model_internal::_doValidationLastValOfPro_description = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPart_number : Array = null;
    model_internal var _doValidationLastValOfPart_number : String;

    model_internal function _doValidationForPart_number(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfPart_number != null && model_internal::_doValidationLastValOfPart_number == value)
           return model_internal::_doValidationCacheOfPart_number ;

        _model.model_internal::_part_numberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPart_numberAvailable && _internal_part_number == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "part_number is required"));
        }

        model_internal::_doValidationCacheOfPart_number = validationFailures;
        model_internal::_doValidationLastValOfPart_number = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfSales_con_code : Array = null;
    model_internal var _doValidationLastValOfSales_con_code : String;

    model_internal function _doValidationForSales_con_code(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfSales_con_code != null && model_internal::_doValidationLastValOfSales_con_code == value)
           return model_internal::_doValidationCacheOfSales_con_code ;

        _model.model_internal::_sales_con_codeIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isSales_con_codeAvailable && _internal_sales_con_code == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "sales_con_code is required"));
        }

        model_internal::_doValidationCacheOfSales_con_code = validationFailures;
        model_internal::_doValidationLastValOfSales_con_code = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPo_detserialnumber : Array = null;
    model_internal var _doValidationLastValOfPo_detserialnumber : ArrayCollection;

    model_internal function _doValidationForPo_detserialnumber(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPo_detserialnumber != null && model_internal::_doValidationLastValOfPo_detserialnumber == value)
           return model_internal::_doValidationCacheOfPo_detserialnumber ;

        _model.model_internal::_po_detserialnumberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPo_detserialnumberAvailable && _internal_po_detserialnumber == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "po_detserialnumber is required"));
        }

        model_internal::_doValidationCacheOfPo_detserialnumber = validationFailures;
        model_internal::_doValidationLastValOfPo_detserialnumber = value;

        return validationFailures;
    }
    

}

}
